<div id="content_body" class="content_body">
	<div class="main-title">
		<fly:translate name="title_1"/><fly:modify name="title_1" />
	</div>
	<form method="post" id="frm_place">		
		<input type="hidden" name="visible" id="visible" class="radio"<fly:variable name='checked_visible' /> />
		<input type="hidden" name="index" id="index" class="radio" <fly:variable name='checked_index' /> />	
		<input type="hidden" name="follow" id="follow" class="radio" <fly:variable name='checked_follow' /> />
	<div id="place_first">			
		<div id="form-place-ligne">	
			<div id="line_place_field">
				<fly:translate name="label_1_20"/><fly:modify name="label_1_20" />
				<div id="field_real">
					<select name="type_real" id="type_real" class="oblig info_bull" alt="" >
						<option <fly:variable name="selected_default"/> disabled="true" value=""> <fly:translate name="text_1_1"/> </option>					
						<fly:list name="list_real_type">
							<option value="<fly:variable name='id_real_estate_type'/>" <fly:variable name='selected_real'/> ><fly:variable name='real_title'/></option>
						</fly:list> 							
					</select>					
				<fly:modify name="text_1_1" />
				</div>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_real_estate'/>				
				<fly:modify name="text_real_estate" />
				<input type='hidden' id='hidden_type_real_text' name='hidden_type_real_text'/>
			</div>
		</div>	
		<div class="dotted_lavel_1"></div>
		<div id="form-place-ligne">	
			<div id="line_place_field">	
				<fly:translate name="label_1_23"/><fly:modify name="label_1_23" />
				<div id="wrap_width">			
					<div id="wrap_category">
						<input type="hidden" class="oblig" name="chca" id="chca" />
						<fly:list name='list_category'>
		                   		<input type="checkbox"  class="info_bull chca" alt="" id="<fly:variable name='id_category_map' />" name="c<fly:variable name='id_category_map' />" value="<fly:variable name='id_category_map' />" <fly:variable name='checked' />/>&nbsp;<fly:variable name='category_title' />
		                </fly:list>
		       		</div>	
		       	</div>    	       				
                <span class="required_check"></span>	
			</div>
			<div id="line_place_text">
				<fly:translate name='text_category'/>			
				<fly:modify name="text_category" />				
			</div>
		</div>
		<div class="dotted_lavel_1"></div>
		<div id="form-place-ligne">	
			<div id="line_place_field">	
				<fly:translate name="label_1_1"/><fly:modify name="label_1_1" />
				<input type="text" alt="" name="place_name" id="place_name" maxlength="255" size="60" style="width:385px;" value="<fly:variable name='place_name' />" class="oblig info_bull" />
			</div>
			<div id="line_place_text">
				<fly:translate name='text_title'/>
				<fly:modify name="text_title" />
			</div>
			<span class='popup'></span>
		</div>
		<div class="dotted_lavel_1"></div>
		<div id="form-place-ligne">	
			<div id="line_place_field">
				<fly:translate name="label_1_8"/>
				<fly:modify name="label_1_8" />
				<textarea name="content" alt="" class="info_bull" id="content" rows="6" style="width:385px;" cols="42"><fly:variable name='content' /></textarea>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_full_description'/>
				<fly:modify name="text_full_description" />
			</div>
			<span class='popup'></span>
		</div>
		<div class="dotted_lavel_1"></div>
		<input type="hidden" name="url_rewriting" id="url_rewriting" size="116" maxlength="25" value="<fly:variable name='url_rewriting' />" readonly="readonly" class="test noborder" />	
		
		<input type="hidden" name="meta_title" id="meta_title" size="116"  value="<fly:variable name='meta_title' />"/>
		<input type="hidden" name="meta_description" id="meta_description" size="116"  value="<fly:variable name='meta_description' />"/>
		
		<input type="hidden" name="url_rewriting_post" id="url_rewriting_post" />	
		<input type="hidden" name="meta_title_post" id="meta_title_post"/>	
		<input type="hidden" name="meta_description_post" id="meta_description_post"/>
		<input type="hidden" name="language_code" id="language_code" size="116" maxlength="25" value="<fly:variable name='language_code' />"  />		
	
		<div id="form-place-ligne">	
			<div id="line_place_field">
				<fly:translate name="label_1_2"/>
				<fly:modify name="label_1_2" />
				<textarea name="address" alt="" class="info_bull" id="address" rows="6" style="width:385px;" cols="42"><fly:variable name='address' /></textarea>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_address'/>
				<fly:modify name="text_address" />
			</div>
		</div>	
		<div class="dotted_lavel_1"></div>
		<div id="form-place-ligne">
			<input type="hidden" id="hidden_province_text" name="hidden_province_text" />
			<div id="line_place_field">	
				<fly:translate name="label_1_4"/><fly:modify name="label_1_4" />
				<div class="line_width">
					<select name="province" id="province" class="oblig info_bull" alt="" >					
						<option selected="true" disabled="true" value=""> <fly:translate name="text_1_1"/> </option>				
						<fly:list name="list_name_province">
							<option value="<fly:variable name='id_province'/>"  <fly:variable name='selected_province'/> > <fly:variable name='province'/></option>
						</fly:list> 							
					</select>
					<fly:modify name="text_1_1" />
				</div>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_province_district'/>
				<fly:modify name="text_province_district" />
			</div>
		</div>
	</div>	
		<div id="form-place-ligne">
			<input type="hidden" id="hidden_district_text" name="hidden_district_text" />
			<div id="line_place_field">	
				<fly:translate name="xml_district"/><fly:modify name="xml_district" />
				<div class="line_width">
					<select name="district" id="district" class="oblig info_bull" alt="" >					
						<option selected="true" disabled="true" value=""> <fly:translate name="xml_district_info"/> </option>				
						<fly:list name="list_name_district">
							<option value="<fly:variable name='id_district'/>"  <fly:variable name='selected_district'/> > <fly:variable name='district'/></option>
						</fly:list> 							
					</select>
					<fly:modify name="xml_district_info" />
				</div>
			</div>
		</div>
	<div id="place_second">
		<div id="rent">
			<div id="form-place-ligne-gray-dark">	
			<div class="dotted_black"></div>	
				<div id="line_place_field">
					<fly:translate name="label_1_9"/><fly:modify name="label_1_9" />
					<div class="line_width">
						<input type="text" name="price_rental" id="price_rental" maxlength="255" size="30" value="<fly:variable name='price_rental' />" onkeypress="return keyEnable(event,'float',this)"  alt="" class="info_bull" />
						<fly:variable name='currency' />
					</div>
				</div>
				<div id="line_place_text">
					<fly:translate name='popup_1_9'/>
					<fly:modify name="popup_1_9" />
				</div>
			</div>
		</div>
		<div id="sell">	
			<div id="form-place-ligne-gray-dark">	
			<div class="dotted_black"></div>	
				<div id="line_place_field">
					<fly:translate name="label_1_31"/><fly:modify name="label_1_31" />
					<div class="line_width">
						<input type="text" name="price_sell" id="price_sell" maxlength="255" size="30" value="<fly:variable name='price_sell' />" onkeypress="return keyEnable(event,'float',this)"  alt="" class="info_bull" />
						<fly:variable name='currency' />
					</div>
				</div>
				<div id="line_place_text">
					<fly:translate name='popup_1_30'/>
					<fly:modify name='popup_1_30'/>
				</div>
			</div>
		</div>
		
		<div class="dotted_black"></div>
		<div id="form-place-ligne-gray-dark">		
			<div id="line_place_field">
				<fly:translate name="label_1_10"/><fly:modify name="label_1_10" />
				<div class="line_width">
					<input type="text" name="length" id="length" maxlength="255" size="30" value="<fly:variable name='length' />" onkeypress="return keyEnable(event,'float',this)" class="info_bull" alt=""/> m
				</div>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_building_length'/>
				<fly:modify name="text_building_length" />
			</div>
		</div>	
		
		<div class="dotted_black"></div>
		<div id="form-place-ligne-gray-dark">		
			<div id="line_place_field">
				<fly:translate name="label_1_11"/><fly:modify name="label_1_11" />
				<div class="line_width">
					<input type="text" name="width" id="width" maxlength="255" size="30" value="<fly:variable name='width' />" onkeypress="return keyEnable(event,'float',this)" alt="" class="info_bull" /> m
				</div>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_building_width'/>
				<fly:modify name="text_building_width" />
			</div>
		</div>
		
		<div class="dotted_black"></div>
		<div id="form-place-ligne-gray-dark">		
			<div id="line_place_field">
				<fly:translate name="label_1_30"/><fly:modify name="label_1_30" />
				<div class="line_width">
					<input type="text" name="size_building" id="size_building" maxlength="255" size="30" value="<fly:variable name='size_building' />" onkeypress="return keyEnable(event,'float',this)" alt="" class="info_bull" /> m2  
					<span class="total_ha"></span>				
				</div>
				<input type="hidden" id="sms_building_area" name="sms_building_area" value="<fly:variable name='txt_sms_building_area' />" />
				<div class="total_price_ha"></div><fly:modify name="txt_sms_building_area" />
			</div>
			<div id="line_place_text">
				<fly:translate name='text_building_area'/>
				<fly:modify name="text_building_area" />
			</div>
		</div>
		
		<div class="dotted_black"></div>
		<div id="form-place-ligne-gray-dark">
			<div id="line_place_field">
				<fly:translate name="label_1_21"/><fly:modify name="label_1_21" />
				<div class="line_width">
					<input type="text" name="height" id="height" maxlength="255" size="30" value="<fly:variable name='height' />" onkeypress="return keyEnable(event,'float',this)"  alt="" class="info_bull"/> m
				</div>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_building_height'/>
				<fly:modify name="text_building_height" />
			</div>
		</div>

		<div class="dotted_black"></div>
		<div id="form-place-ligne-gray-dark">	
			<div id="line_place_field">	
				<fly:translate name="label_1_28"/><fly:modify name="label_1_28" />
				<div class="line_width">
					<input type="text" name="bedroom" id="bedroom" maxlength="255" size="30" value="<fly:variable name='bedroom' />" onkeypress="return keyEnable(event,'float',this)" alt="" class="info_bull" />
				</div>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_bedroom'/>
				<fly:modify name="text_bedroom" />
			</div>
		</div>
		
		<div class="dotted_black"></div>	
		<div id="form-place-ligne-gray-dark">		
			<div id="line_place_field">	
				<fly:translate name="label_1_29"/><fly:modify name="label_1_29" />
				<div class="line_width">
					<input type="text" name="bathroom" id="bathroom" maxlength="255" size="30" value="<fly:variable name='bathroom' />" onkeypress="return keyEnable(event,'float',this)" alt="" class="info_bull" />
				</div>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_bathroom'/> 
				<fly:modify name="text_bathroom" />
			</div>
		</div>				
		
		<div id="form-place-ligne-gray-dark">
			<div id="form-place-ligne-gray-dark" style="display: inline-block;">
			<div class="dotted_black"></div>	
				<div id="line_place_field">
					<div id="end_date" style="width:150px;"><div id="end" style="width:213px;float:left;"><fly:translate name="xml_start_date"/><fly:modify name="xml_start_date" /></div></div>
					<div class="line_width">
						<input type="text" name="start_date" class="calendar info_bull" id="start_date" maxlength="255" size="20" value="<fly:variable name='start_date' />" onkeypress="return keyEnable(event,'number')"  alt=""/>
					</div>
				</div>
				<div id="line_place_text">
					<fly:translate name='text_start_date'/>
					<fly:modify name="text_start_date" />
				</div>
			</div>
		</div>				
		
		<div id="form-place-ligne-gray-dark">
			<div id="form-place-ligne-gray-dark" style="display: inline-block;">
			<div class="dotted_black"></div>	
				<div id="line_place_field">
					<div id="end_date" style="width:150px;"><div id="end" style="width:213px;float:left;"><fly:translate name="xml_end_date"/><fly:modify name="xml_end_date" /></div></div>
					<div class="line_width">
						<input type="text" name="end_date" class="calendar info_bull" id="start_date" maxlength="255" size="20" value="<fly:variable name='end_date' />" onkeypress="return keyEnable(event,'number')"  alt=""/>
					</div>
				</div>
				<div id="line_place_text">
					<fly:translate name='text_end_date'/>
					<fly:modify name="text_end_date" />
				</div>
			</div>
		</div>
		
		<div class="dotted_black"></div>	
		<div id="form-place-ligne-gray-dark">		
			<div id="line_place_field">
				<fly:translate name="label_1_12"/><fly:modify name="label_1_12" />				
					<input type="hidden" id="hidden_mezzanine_text" name="hidden_mezzanine_text" value="<fly:translate name="label_1_12"/>" />
					<input type="checkbox" name="mezzanine" id="mezzanine" class="radio info_bull" <fly:variable name='checked_mezzanine' /> alt=""/>				
			</div>
			<div id="line_place_text">
				<fly:translate name='text_mezzanine'/>
				<fly:modify name="text_mezzanine" />
			</div>
		</div>
		
		<div class="dotted_black"></div>	
		<div id="form-place-ligne-gray-dark">	
			<div id="line_place_field">
				<fly:translate name="label_1_13"/><fly:modify name="label_1_13" />				
					<input type="hidden" id="hidden_furnished_apartment_text" name="hidden_furnished_apartment_text" value="<fly:translate name="label_1_13"/>" />
					<input type="checkbox" name="furnished_apartment" id="furnished_apartment" class="radio info_bull" <fly:variable name='checked_furnished_apartment' /> alt=""/>				
			</div>
			<div id="line_place_text">
				<fly:translate name='text_furnished_apartment'/>
				<fly:modify name="text_furnished_apartment" />
			</div>
		</div>
		
		<div id="show-detail">
			<div id="form-place-ligne-gray-dark">
			<div class="dotted_black"></div>		
				<div id="line_place_field">
					<fly:translate name="label_1_14"/><fly:modify name="label_1_14" />
					<textarea name="furnished_detail" id="furnished_detail" rows="6" cols="42" alt="" class="info_bull"><fly:variable name='furnished_detail' /></textarea>
				</div>
				<div id="line_place_text">
					<fly:translate name='text_furnished_detail'/>
					<fly:modify name="text_furnished_detail" />
				</div>
			</div>
		</div>
		
		<div id="show-detail">
			<div id="form-place-ligne-gray-dark">
			<div class="dotted_black"></div>		
				<div id="line_place_field">
					<fly:translate name="xml_comment"/><fly:modify name="xml_comment" />
					<textarea name="comment" id="comment" rows="6" cols="42" alt="" class="info_bull"><fly:variable name='comment' /></textarea>
				</div>
				<div id="line_place_text">
					<fly:translate name='text_comment'/>
					<fly:modify name="text_comment" />
				</div>
			</div>
		</div>
		
		<div class="dotted_black"></div>
		<div id="form-place-ligne-gray-dark">	
			<div id="line_place_field" >
				<fly:translate name="label_1_15" /><fly:modify name="label_1_15" />
				<div class="line_width">
					<input type="text" name="floor" id="floor" maxlength="255" size="30" value="<fly:variable name='floor' />" onkeypress="return keyEnable(event,'number')"  alt="" class="info_bull"/>
				</div>
			</div>
			<div id="line_place_text">
			 	<fly:translate name='text_storey'/>
				<fly:modify name="text_storey" />
			</div>
		</div>	
		
		<div class="dotted_black"></div>
		<div id="form-place-ligne-gray-dark">	
			<div id="line_place_field">
				<fly:translate name="label_1_16"/><fly:modify name="label_1_16" />
				<div class="line_width">
					<input type="text" name="number_floor" id="number_floor" maxlength="255" size="30" value="<fly:variable name='number_floor' />" onkeypress="return keyEnable(event,'number')"  alt="" class="info_bull"/>
				</div>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_storeyed_numbers'/> 
				<fly:modify name="text_storeyed_numbers" />
			</div>
		</div>
		
		<div class="dotted_black"></div>	
		<div id="form-place-ligne-gray-dark">
			<div id="line_place_field">
				<fly:translate name="label_1_17"/><fly:modify name="label_1_17" />
				<input type="hidden" id="hidden_tenant_text" name="hidden_tenant_text" value="<fly:translate name="label_1_17"/>" />
				<input type="checkbox" name="tenant" id="tenant" class="radio info_bull" <fly:variable name='checked_tenant' /> alt="" />
			</div>
			<div id="line_place_text">
				<fly:translate name='text_there_is_actually_a_tenant'/>
				<fly:modify name="text_there_is_actually_a_tenant" />
			</div>
		</div>
		
		<div id="show-tenant-end-date">
			<div id="form-place-ligne-gray-dark" style="display: inline-block;">
			<div class="dotted_black"></div>	
				<div id="line_place_field">
					<div id="end_date" style="width:150px;"><div id="end" style="width:213px;float:left;"><fly:translate name="label_1_18"/><fly:modify name="label_1_18" /></div><div id="date"><fly:translate name="label_1_19"/><fly:modify name="label_1_19" /></div></div>
					<div class="line_width">
						<input type="text" name="end_tenant" class="calendar info_bull" id="end_tenant" maxlength="255" size="20" value="<fly:variable name='end_tenant' />" onkeypress="return keyEnable(event,'number')"  alt=""/>
					</div>
				</div>
				<div id="line_place_text">
					<fly:translate name='text_tenancy_ending'/>
					<fly:modify name="text_tenancy_ending" />
				</div>
			</div>
		</div>		
	</div>
	<div id="place_third">
		<div class="dotted_lavel_1"></div>
		<div id="form-place-ligne">	
			<div id="line_place_field">
				<fly:translate name="label_1_25"/><fly:modify name="label_1_25" />
				<div class="line_width">
					<input type="text" name="length_land" id="length_land" maxlength="255" size="30" value="<fly:variable name='length_land' />" onkeypress="return keyEnable(event,'float',this)"  alt="" class="info_bull"/> m
				</div>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_land_length'/>
				<fly:modify name="text_land_length" />
			</div>
		</div>
		<div class="dotted_lavel_1"></div>
		<div id="form-place-ligne">	
			<div id="line_place_field">
				<fly:translate name="label_1_26"/><fly:modify name="label_1_26" />
				<div class="line_width">
					<input type="text" name="width_land" id="width_land" maxlength="255" size="30" value="<fly:variable name='width_land' />" onkeypress="return keyEnable(event,'float',this)"  alt="" class="info_bull"/> m
				</div>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_land_width'/>
				<fly:modify name="text_land_width" />
			</div>
		</div>
		
		<div class="dotted_lavel_1"></div>
		<div id="form-place-ligne">	
			<div id="line_place_field">
				<fly:translate name="label_1_27"/><fly:modify name="label_1_27" />
				<div class="line_width">
					<input type="text" name="size_land" id="size_land" maxlength="255" size="30" value="<fly:variable name='size_land' />" onkeypress="return keyEnable(event,'float',this)" alt="" class="info_bull" /> m2
					<span class="total_land_ha"></span>
				</div>
				<div class="total_price_ha2"></div>
			</div>
			<div id="line_place_text">
				<fly:translate name='text_land_area'/>
				<fly:modify name="text_land_area" />
			</div>
		</div>
	</div>
		<div id="place_fourth">	
			<div class="dotted_black"></div>
			<div id="form-place-ligne-gray-dark">
				<div id="line_place_field">
					<fly:translate name="label_1_32"/><fly:modify name="label_1_32" />
					<div class="line_width">
						<fly:list name="listkeyword_1">
							<span><input type="checkbox" name="k<fly:variable name='key_link_1' />" id="k<fly:variable name='key_link_1' />" value="<fly:variable name='key_link_1' />" class="radio info_bull" <fly:variable name='checked_key1' /> alt="" />&nbsp;<fly:variable name="title1" /></span>
						</fly:list>
					</div>
				</div>
				<div id="line_place_text">
					<fly:translate name='text_facilities'/>
					<fly:modify name='text_facilities'/>
				</div>
			</div>
		</div>
				
		<div id="form-ligne">	
			<div id="form-titre">&nbsp;</div>
			<div id="form-field">
				<input type="button" name="<fly:variable name='button_value' />" class="submit" id="<fly:variable name='button_id' />" value="<fly:variable name='button_value' />" /> 
				<input type="hidden" name="id_language_link"  id="id_language_link" value="<fly:variable name='id_language_link' />" />
				<input type="hidden" name="Create"  id="create" />
				<fly:block name="button_1">
					<fly:modify name="button_1" />
				</fly:block>
				<fly:block name="button_2">
					<fly:modify name="button_2" />
				</fly:block>
			</div>
		</div>
			<input type="hidden" value="<fly:variable name='language_code' />" name="language_code" id="language_code" />
	
<fly:modify name="message_1" />
<fly:modify name="message_2" />

<input type='hidden' name='other_pop_up' id='other_pop_up' value="<fly:translate name='text_1_3'/>">
</form>
</div>
<script type="text/javascript">
 //--Create by RATANAK--//
		if(oTime = true){
			var c = false;
			$(".chca").each(function(){
				if ($(this).is(':checked')) return c = true;
			});
			if(c == true) $("#chca").val('1');
			oTime = false;
		}
		$(".chca").click(function(){
			var ch = false;
			$(".chca").each(function(){
				if ($(this).is(':checked')) return ch = true;
			});
			if(ch == true) $("#chca").val('1');
			else $("#chca").val('');
		});
		
	$('#furnished_apartment').attr('checked')?$('#show-detail').show():$('#show-detail').hide();
	$('#tenant').attr('checked')?$('#show-tenant-end-date').show():$('#show-tenant-end-date').hide();
	function setMeta(){
			//get url rewriting
			var place_name = $('#place_name').val();
			var id_language_link = $('#id_language_link').val();
			if(place_name!=""){
				var url_rewriting = ($('#url_rewriting').val() + removeAccents($('#place_name').val()).toLowerCase());
				var meta_title = place_name + ' ' + $('#meta_title').val();
				var meta_description = place_name + ' ' + $('#meta_description').val();
				
				$('#url_rewriting_post').val(url_rewriting);
				$('#meta_title_post').val(meta_title);
				$('#meta_description_post').val(meta_description);
			}
	}
	$(document).ready(function() {
		setMeta();
		$('#place_name').change(function(){
			setMeta();
		});
		
    	$("body").append('<div class="info_div"><div class="info_div_top"></div><div class="info_div_middle"><div class="info_div_text"></div></div><div class="info_div_bottom"></div></div>');
	   	$('#furnished_apartment').click(function(){
	   		this.checked?$('#show-detail').show():$('#show-detail').hide();
	   	});
	   	$('#tenant').click(function(){
	   		this.checked?$('#show-tenant-end-date').show():$('#show-tenant-end-date').hide();
	   	});
	   	
	   	var rent = '<fly:constant name="FOR_RENT"/>';
	   	var sell = '<fly:constant name="FOR_SELL"/>';
	   	$('.submit').click(function(){
	   		id = $(this).attr("id");
	   		if(id != '') $("#create").attr("name","Modify");
	   		if(id == '') $("#create").attr("name","Create");
	   		
	   		//=================
	   		$(".chca").each(function(){		
				if($(this).is(':checked')) {
					var id = $(this).attr("id");
					if(id == rent){
						$("#rent").css("display","block");
						if($("#price_rental").val()>0 )	$("#price_rental").removeClass("oblig");	
						else $("#price_rental").addClass("oblig");
					}
					if(id == sell){
						$("#sell").css("display","block");
						if($("#price_sell").val()>0) $("#price_sell").removeClass("oblig");
						else $("#price_sell").addClass("oblig");
					}
				}
	   		});	 
	   	
	   		prepareTextFromComboAndCheckBox();
	   		$("#frm_place").submit();
	   	});
	   
	   	$(".chca").each(function(){
	   		if(!$(this).is(':checked')) {
				var id = $(this).attr("id");
				if(id == rent){
					$("#rent").css("display","none");
					$("#price_rental").removeClass("oblig");
				}
				if(id == sell){
					$("#sell").css("display","none");
					$("#price_sell").removeClass("oblig");
				}
			}
	   	});	 
		
	   	$(".chca").click(function(){
		   	$(this).each(function(){
				if ($(this).is(':checked')) {
					var id = $(this).attr("id");
					if(id == rent){
						$("#rent").css("display","block");
						$("#price_rental").addClass("oblig");
					}
					if(id == sell){
						$("#sell").css("display","block");
						$("#price_sell").addClass("oblig");
					}
				}
				if(!$(this).is(':checked')) {
					var id = $(this).attr("id");
					if(id == rent){
						$("#rent").css("display","none");					
						$("#price_rental").removeClass("oblig");	
						$("#price_rental").val("");	
					}
					if(id == sell){
						$("#sell").css("display","none");
						$("#price_sell").removeClass("oblig");
						$("#price_sell").val("");	
					}
				}
			});
		});
									
			
		$('.calendar').calendar({autoPopUp: 'both', 
		buttonImageOnly: true, buttonImage: '../_design/calendar.gif', 
		buttonText: 'Calendar'});

		//***********************//
	});
	function setInfoBulles(obj){
				
		if($(obj).attr('alt')!="undefined"){
			if(obj.id=="your_email"){
				if(!IsNumeric($('#combo_day').val()) ||!IsNumeric($('#combo_month').val()) || !IsNumeric($('#combo_year').val()) ){
					$('.info_div_text').text("<fly:translate name='popup_1_9'/>");				
				}else{
					$('.info_div_text').text($(obj).attr('alt'));
				}
			}else{
				$('.info_div_text').text($(obj).attr('alt'));
			}			
		}else{
			$('.info_div_text').text($(obj).attr('title'));
		}
		$('.info_div').css("display","block");
	}
	function prepareTextFromComboAndCheckBox(){
		// hidden_type_real_text
		var type_real_text = $("#type_real option:selected").text();
		$("#hidden_type_real_text").val(type_real_text);
		//hidden_province_text
		var hidden_province_text = $("#province").text();
		$("#hidden_province_text").val(hidden_province_text);
		//hidden_mezzanine_text
		var hidden_mezzanine_text = "#hidden_mezzanine_text";
		if ($("#mezzanine").is(':checked')){
			$(hidden_mezzanine_text).removeAttr("disabled");
		}else{
			$(hidden_mezzanine_text).attr("disabled","disabled");
		}
		//hidden_tenant_text
		var hidden_tenant_text = "#hidden_tenant_text";
		if ($("#tenant").is(':checked')){
			$(hidden_tenant_text).removeAttr("disabled");
		}else{
			$(hidden_tenant_text).attr("disabled","disabled");
		}
		
	}
	
</script>